<% buckets.each do |bucket| -%>
resource "aws_s3_bucket" "<%= module_name_of(bucket) %>" {
    bucket = "<%= bucket.name %>"
    acl    = "private"
<%- unless (policy = bucket_policy_of(bucket)).nil? -%>
    policy = <<POLICY
<%= prettify_policy(policy.policy.read) %>
POLICY
<%- end -%>
}

<% end -%>
